﻿using System;

namespace MediaScraper.Common
{
    public class Disposable : IDisposable
    {

        private bool _disposed;

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize((object) this);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                DisposeCore();
            }

            _disposed = true;
        }

        public virtual void DisposeCore()
        {
            
        }
    }
}